#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

class Solution
{
public:
    int firstUniqChar(string s)
    {
        for (int i = 0;i < s.size();i++)
        {
            if (s.find(s[i]) == s.rfind(s[i]))
                return i;
        }
        return -1;
    }
};